package com.mayisoftware.mayioa.business.plan.impl.dao;

import com.mayisoftware.mayioa.business.plan.api.domain.PlanAchievement;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface PlanArchMapper {
    /**
     * 根据分页条件查询计划绩效
     * @param planAchievement 绩效条件
     * @return
     */
    public List<PlanAchievement> selectPlanAchList(PlanAchievement planAchievement);

    /**
     * 查询不在当前计划中的绩效
     * @param planCfgId 计划ID
     * @return 绩效列表
     */
    public List<PlanAchievement> selectPlanAchListByPlanId(@Param("planCfgId")Long planCfgId);

    /**
     * 根据绩效ID查询绩效信息
     * @param planAchId 绩效信息
     * @return
     */
    public PlanAchievement selectPlanAchById(Long planAchId);

    /**
     * 插入计划绩效
     * @param planAchievement 绩效
     * @return
     */
    public int insertPlanAch(PlanAchievement planAchievement);

    /**
     * 更新计划绩效
     * @param planAchievement 绩效
     * @return
     */
    public int updatePlanAch(PlanAchievement planAchievement);

    /**
     * 批量删除绩效
     * @param ids 绩效id数组
     * @return
     */
    public int deletePlanAchByIds(Long[] ids);

    /**
     * 查询绩效最大分数
     * @return
     */
    public Integer selectPlanAchMaxScore();
}
